package com.freewater.springboot.demo.ioc.lazyinit;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.*;

@Configuration
@EnableAspectJAutoProxy
public class AppConfig {

    @Lazy
    @Bean
    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
    public SomeService someService() {
        return new SomeService();
    }

    @Bean
    public SimpleAspect simpleAspect() {
        return new SimpleAspect();
    }
}
